package com.test.io;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;

// if you want to serialize static field ,you must do it yourself
public class RecoverCADState {
	@SuppressWarnings("unchecked")
	public static void main(String[] args)throws Exception{
		ObjectInputStream in = new ObjectInputStream(new FileInputStream("CADState.out"));
		// read in the same order they were written"
//		List<Class<? extends Shape>> shapeTypes = (List<Class<? extends Shape>>) in.readObject();
		List<Shape> shapes = (List<Shape>) in.readObject();
		System.out.println(shapes);
	}
}
